package com.liaowei.comment.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.liaowei.comment.model.param.ArticleCommentParam;
import com.liaowei.model.domain.ArticleComment;
import com.liaowei.model.param.QueryManageArticleCommentParam;
import com.liaowei.model.vo.ArticleCommentVO;

import java.util.List;

/**
* @author LindaMan
* @description 针对表【wy_article_comment(文章-评论表)】的数据库操作Service
* @createDate 2023-05-09 15:26:25
*/
public interface ArticleCommentService extends IService<ArticleComment> {

    // 评论文章
    String saveArticleComment(ArticleCommentParam commentParam);

    // 删除评论
    String deleteArticleComment(Long commentId,Long articleId,Long userId);

    // 分页查询评论列表
    IPage<ArticleCommentVO> searchPage(QueryManageArticleCommentParam commentParam);

    // 后台-分页查询评论列表
    IPage<ArticleCommentVO> searchManagePage(int pageNum, int pageSize);

    // 根据文章id删除文章的评论
    String deleteArticleCommentByIdAndUserId(Long articleId, Long userId);

    //查询用户是否对该文章评论过
    List<ArticleComment> searchIsCommented(Long articleId, Long userId);
}
